package com.tlias.mapper;

import com.tlias.pojo.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Mapper
public interface DeptMapper {
    //查询所有部门
    List<Dept> deptListSql();

    //增加部门
    Integer addDeptSql(Dept dept);

    //根据部门名称查询部门
//    @Transactional(isolation = Isolation.READ_UNCOMMITTED)
    Dept findDeptByNameSql(String name);

    //修改部门名
    Integer updateBYId(Dept dept);

    //删除部门
    Integer deleteById(Integer id);

    //根据id查询部门
    Dept findDeptByIdSql(Integer id);
}
